import Types from '../../action/types.js';


const defaultState = {

};
export default function onAction(state = defaultState, action) {
  switch (action.type) {
    case Types.COURSE_TEACHER_LOAD_SUCCESS:
      return {
        ...state,
        courseTeacher: action.courseTeacher,
      };
      break;
    case Types.COURSE_TEACHER_LOAD_FAIL:
      return {
        ...state,
        error: action.error
      };
      break;
    case Types.COURSE_SCHEDULE_LOAD_SUCCESS:
      return {
        ...state,
        courseSchedule: action.courseSchedule,
      };
      break;
    case Types.COURSE_SCHEDULE_LOAD_FAIL:
      return {
        ...state,
        error: action.error
      };
      break;
    case Types.COURSE_NOTICE_LOAD_SUCCESS:
      return {
        ...state,
        courseNotice: action.courseNotice,
      };
      break;
    case Types.COURSE_NOTICE_LOAD_FAIL:
      return {
        ...state,
        error: action.error
      };
      break;
    default:
      return state
  }
}
